home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
clipper
/
nftroff.zip
/
14.tr
< prev
next >
Wrap
Text File
|
1991-11-21
|
28KB
|
1,663 lines
.de }n
.bp
.sp .5i
..
.wh -.8i }n
.sp .5i
.po -.4i
.ll 7.5i
.ps 9
.vs 9
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_ADAPTER() Report the type of video adapter installed
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_ADAPTER()
Report the type of video adapter installed
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_ADAPTER() -> nResult
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
Integer representing type of video adapter
.sp
.in 0.64i
.br
0 - monochrome
.br
1 - CGA
.br
2 - EGA
.br
3 - VGA
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function is valuable if you use a graphics library and need to
know what type of graphics adapter is installed\.
.sp
The source code is written to adhere to Turbo Assembler\'s IDEAL mode\.
To use another assembler, you will need to rearrange the PROC and
SEGMENT directives, and also the ENDP and ENDS directives (a very
minor task)\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
iVideo := FT_ADAPTER()
.sp
.br
DO CASE
.in 0.64i
.br
CASE iVideo == 0
.in 0.88i
.br
QOUT( "You have a monochrome adapter\." )
.in 0.64i
.br
CASE iVideo == 1
.in 0.88i
.br
QOUT( "You have a CGA adapter\." )
.in 0.64i
.br
CASE iVideo == 2
.in 0.88i
.br
QOUT( "You have an EGA adapter\." )
.in 0.64i
.br
CASE iVideo == 3
.in 0.88i
.br
QOUT( "You have a VGA adapter\." )
.in 0.4i
.br
ENDCASE
.sp
.in 0.08i
\fBSource:\fR ADAPTER\.ASM
.sp
\fBAuthor:\fR Ted Means
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_SETMODE()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_CLS() Clear screen
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_CLS()
Clear screen
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_CLS( <nTRow>, <nLCol>, <nBRow>, <nRCol>, <nColor> ) -> NIL
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
.ta 2.48i
\fB<nTRow>\fR, \fB<nLCol>\fR, \fB<nBRow>\fR and \fB<nRCol>\fR are the screen coordinates
.br
.ta
to clear\.
.sp
\fB<nColor>\fR is an integer representing the color attribute\.
The formula is:
.sp
.in 0.56i
nFore + ( nBack * 16 )
.sp
.in 0.4i
The default is black\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
NIL
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This is a high speed function to clear the screen at the given
coordinates with the given color attribute\. This does not change
Clipper\'s color settings\. It uses direct video writes for speed\.
.sp
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
FT_CLS( 0, 0, MaxRow(), MaxCol(), 165 )
.sp
This example will clear the entire screen with the colors
bright white on magenta\.
.sp
.in 0.08i
\fBSource:\fR VIDEO1\.C
.sp
\fBAuthor:\fR Robert A\. DiFalco
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_GETMODE() Get the video mode
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_GETMODE()
Get the video mode
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_GETMODE() -> nVMode
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
The video mode, as a numeric\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
Use this function to find out what mode your display adapter is in\.
Uses DOS interrupt 10h to get the mode\. For a table of modes
available on various graphics adapters, refer to a book such
as Wilton\'s "Programmer\'s Guide to PC & PS/2 Video Systems"
(Microsoft Press)
.sp
.in 0.08i
\fBExamples
.sp
.in 0.64i
function main( cMode )
.sp
.in 0.8i
.br
FT_SETMODE( val( cMode ) )
.br
QOut( "Video mode is: " + str( FT_GETMODE() ) )
.br
return ( nil )
.sp
.sp
.in 0.08i
\fBSource:\fR VIDMODE\.PRG
.sp
\fBAuthor:\fR Glenn Scott
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_GETVCUR() Return info about the cursor on a specified video page
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_GETVCUR()
Return info about the cursor on a specified video page
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_GETVCUR( [ <nPage> ] ) -> <aCurInfo>
.sp
.in 0.08i
\fBArguments
.sp
.in 0.32i
\fB<nPage>\fR is the video page to get the cursor information for\.
Defaults to the current page, as returned by FT_GETVPG()\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
A four-element array (<aCurInfo>), set up as follows:
.sp
.br
aCurInfo[1] = Top line of cursor
.br
aCurInfo[2] = Bottom line of cursor
.br
aCurInfo[3] = Character row
.br
aCurInfo[4] = Character column
.sp
.sp
.in 0.08i
\fBDescription
.sp
.sp
.in 0.32i
FT_GETVCUR() uses FT_INT86() to invoke interrupt 10h, function
3, to return the character cursor location for the specified
video page\.
.sp
The top line and bottom line of cursor are set depending on
the current cursor mode, and are only meaningful in alphanumeric
video modes\.
.sp
For more information on graphics programming, cursors, and
cursor modes, refer to Richard Wilton\'s _Programmer\'s Guide to
PC and PS/2 Video Systems_ (Microsoft Press)\.
.sp
.sp
.in 0.08i
\fBExamples
.sp
.sp
.in 0.4i
.ta 2.24i
.br
aCurInfo := getVCur( 1 ) // Get info on cursor pos in page 1
.br
.ta
.ta 3.12i
.br
QOut("Row: " + str( aCurInfo[3] ) + " Col: " + str( aCurInfo[4] ) )
.br
.ta
.sp
.sp
.sp
.in 0.08i
\fBSource:\fR VIDCUR\.PRG
.sp
\fBAuthor:\fR Glenn Scott
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_GETVPG() Get the currently selected video page
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_GETVPG()
Get the currently selected video page
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_GETVPG() -> <nPage>
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
The video page, as a numeric\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
Get the currently selected video page
.sp
For more information on graphics programming and video pages,
consult a reference such as _Programmer\'s Guide to PC and PS/2
Video Systems_ (Microsoft Press)\.
.sp
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
nPage := FT_GETVPG()
.sp
.in 0.08i
\fBSource:\fR PAGE\.PRG
.sp
\fBAuthor:\fR Glenn Scott
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_SETVPG()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_RESTATT() Restore the attribute bytes of a specified screen region\.
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_RESTATT()
Restore the attribute bytes of a specified screen region\.
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_RESTATT( <nTop>, <nLeft>, <nBottom>, <nRight>, <cAttributes> ) -> NIL
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<nTop>\fR, \fB<nLeft>\fR, \fB<nBottom>\fR, and \fB<nRight>\fR define the screen region\.
\fB<cAttributes>\fR is a character string containing the attribute bytes
.in 1.52i
for the screen region\. This will most often be a string
previously returned by FT_SAVEATT(), but any character
string may be used (provided it is of the proper size)\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
NIL
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function is similar to Clipper\'s RestScreen(), except that it only
restores the attribute bytes\. This is useful if you want to change the
screen color without affecting the text\.
.sp
*** INTERNALS ALERT ***
.sp
This function calls the Clipper internal __gtMaxCol to obtain the
maximum column value for the current video mode\. If you\'re too gutless
to use internals, then this function isn\'t for you\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
// Restore attributes of row 4
.br
FT_RESTATT( 4, 0, 4, maxcol(), cBuffer)
.sp
.br
// Restore attributes to middle of screen
.br
FT_RESTATT(10,20,14,59,cBuffer)
.sp
.in 0.08i
\fBSource:\fR RESTATT\.ASM
.sp
\fBAuthor:\fR Ted Means
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_SAVEATT()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_REVATTR() Reverse colors of specified screen coordinates
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_REVATTR()
Reverse colors of specified screen coordinates
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_REVATTR( <nTRow>, <nLCol>, <nBRow>, <nRCol> ) -> NIL
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<nTRow>\fR, \fB<nLCol>\fR, \fB<nBRow>\fR, and \fB<nRCol>\fR are the coordinates of the
screen region\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
NIL
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This is a high speed function to reverse the color of a specified
screen region without disturbing any text